﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MongoDB.Bson;

namespace MongoServices
{
	/// <summary>
	/// The interface for a &quot;Read Only&quot; service.
	/// </summary>
	/// <typeparam name="T">The MongoServices model to be used by this service.</typeparam>
	public interface IReadOnlyService<T> : IMongoServicesService<T>
		where T : MongoServicesModel
	{
		/// <summary>
		/// Gets a collection of the <see cref="MongoServicesModel"/>s from the <see cref="IReadOnlyRepository&lt;T&gt;"/>.
		/// </summary>
		/// <returns>An enumerable list of the models.</returns>
		IEnumerable<T> GetAll();

		/// <summary>
		/// Gets one <see cref="MongoServicesModel"/> from the <see cref="IReadOnlyRepository&lt;T&gt;"/>.
		/// </summary>
		/// <param name="id">The &quot;Id&quot; of the <see cref="MongoServicesModel"/> to be retrieved.</param>
		/// <returns>The selected <see cref="MongoServicesModel"/>.</returns>
		T GetById(ObjectId id);
	}
}
